<?php

namespace App\Imports;

use App\Models\Hero;
use Maatwebsite\Excel\Concerns\OnEachRow;
use Maatwebsite\Excel\Concerns\WithBatchInserts;
use Maatwebsite\Excel\Concerns\WithChunkReading;
use Maatwebsite\Excel\Row;

class HerosImport implements OnEachRow, WithBatchInserts, WithChunkReading
{
    public function getCsvSettings(): array
    {
        return [
            'input_encoding' => 'utf-8'
        ];
    }

    public function onRow(Row $row)
    {
        dd($row);
    }

    public function batchSize(): int
    {
        return 10;
    }

    public function chunkSize(): int
    {
        return 10;
    }
}
